#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from newspaper import Article
# pip install newspaper3k

home = 'https://ent.sina.com.cn'
urls =[home+'/s/m/2019-11-21/doc-iihnzhfz0669289.shtml',
home+'/s/m/2019-11-21/doc-iihnzahi2340677.shtml']

for url in urls:
    news = Article(url, language='zh')
    news.download()
    news.parse()
    text = news.text
    print(text)

    news.nlp()  # 自然语言处理
    print("摘要：%s \n\n 关键字：%s" % (news.summary, news.keywords))
    print('-------------华丽的分割线-------------')
